﻿@using VietTrips.WebUI.Helpers
@model VietTrips.Domain.Models.UserProfile

@{
    List<SelectListItem> provinces = (List<SelectListItem>)ViewBag.provinces ?? new List<SelectListItem>();
    NavCurrentHelper.Menu = 2;                                                  // Store the navigation side bar state
    NavCurrentHelper.Submenu = 2;                                               // Store the navigation side bar state
    ViewBag.Title = "Sửa Tài Khoản";
    Layout = "~/Areas/Management/Views/Shared/_AdminLayout.cshtml";
}

@section featured {
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
        <div class="col-md-12">
            <!-- BEGIN PAGE TITLE & BREADCRUMB-->
            <h3 class="page-title">
                @ViewBag.Title
            </h3>
            <ul class="page-breadcrumb breadcrumb">
                <li>
                    <i class="fa fa-home"></i>
                    <a href="@Url.Action("Dashboard", "Admin")">
                        Trang Quản Lý
                    </a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    Danh Sách Tài Khoản
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="#">
                        @ViewBag.Title
                    </a>
                </li>
                <li class="pull-right">
                    <div id="dashboard-report-range" class="dashboard-date-range tooltips" data-placement="top" data-original-title="Change dashboard date range">
                        <i class="fa fa-calendar"></i>
                        <span>
                        </span>
                        <i class="fa fa-angle-down"></i>
                    </div>
                </li>
            </ul>
            <!-- END PAGE TITLE & BREADCRUMB-->
        </div>
    </div>
}

<div class="row">
    <div class="col-md-11">
        <div class="portlet">
            <div class="portlet-title mt-20">
                <div class="caption">
                    <i class="fa fa-certificate"></i>Thêm Nhóm Hoạt Động
                </div>
            </div>
            @using (Html.BeginForm("EditUser", "UserManager"))
            {
                <div class="portlet">
                    <div class="portlet-body form">
                        <div class="form-body">
                            @Html.AntiForgeryToken()
                            <div class="row mt-10">
                                @Html.LabelFor(m => m.FullName, htmlAttributes: new Dictionary<string, object> { { "class", "col-md-3 ml-10 control-label" } })
                                <div class="col-md-8">
                                    @Html.TextBoxFor(m => m.FullName, htmlAttributes: new Dictionary<string, object> { { "class", "form-control" }, { "placeholder", "Họ và tên đầy đủ" } })
                                    <p class="text-danger text-error">@Html.ValidationMessageFor(m => m.FullName)</p>
                                </div>
                            </div>
                            <div class="row mt-10">
                                @Html.LabelFor(m => m.Email, htmlAttributes: new Dictionary<string, object> { { "class", "col-md-3 ml-10 control-label" } })
                                <div class="col-md-8">
                                    @Html.TextBoxFor(m => m.Email, htmlAttributes: new Dictionary<string, object> { { "class", "form-control" }, { "placeholder", "Địa chỉ Email" } })
                                    <p class="text-danger text-error">@Html.ValidationMessageFor(m => m.Email)</p>
                                </div>
                            </div>
                            <div class="row mt-10">
                                @Html.LabelFor(m => m.Female, htmlAttributes: new Dictionary<string, object> { { "class", "col-md-3 ml-10 control-label" } })
                                <div class="col-md-8">
                                    @Html.DropDownListFor(m => m.Female, new List<SelectListItem>
                                        {
                                            new SelectListItem() {Text = "Ông", Value = "false"},
                                            new SelectListItem() {Text = "Bà", Value = "true"}
                                        }, htmlAttributes: new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="row mt-30">
                                @Html.LabelFor(m => m.Phone, htmlAttributes: new Dictionary<string, object> { { "class", "col-md-3 ml-10 control-label" } })
                                <div class="col-md-8">
                                    @Html.TextBoxFor(m => m.Phone, htmlAttributes: new Dictionary<string, object> { { "class", "form-control" }, { "placeholder", "Số điện thoại" } })
                                    <p class="text-danger text-error">@Html.ValidationMessageFor(m => m.Phone)</p>
                                </div>
                            </div>
                            <div class="row mt-10">
                                @Html.LabelFor(m => m.Address, htmlAttributes: new Dictionary<string, object> { { "class", "col-md-3 ml-10 control-label" } })
                                <div class="col-md-8">
                                    @Html.TextAreaFor(m => m.Address, htmlAttributes: new Dictionary<string, object> { { "class", "form-control" }, { "placeholder", "Địa chỉ liên hệ" }, { "rows", "4" } })
                                    <p class="text-danger text-error">@Html.ValidationMessageFor(m => m.Address)</p>
                                </div>
                            </div>
                            <div class="row mt-10">
                                @Html.LabelFor(m => m.City, htmlAttributes: new Dictionary<string, object> { { "class", "col-md-3 ml-10 control-label" } })
                                <div class="col-md-8">
                                    @Html.DropDownListFor(m => m.City, provinces, htmlAttributes: new Dictionary<string, object> { { "class", "form-control" }, { "placeholder", "Tỉnh / Thành phố" } })
                                    <p class="text-danger text-error">@Html.ValidationMessageFor(m => m.City)</p>
                                </div>
                            </div>
                            <div class="row mt-10">
                                @Html.LabelFor(m => m.DateOfBirth, htmlAttributes: new Dictionary<string, object> { { "class", "col-md-3 ml-10 control-label" } })
                                <div class="col-md-8">
                                    <div class="input-group input-medium date date-picker" data-date-format="dd/mm/yyyy" data-date-end-date="-16y">
                                        @Html.TextBoxFor(m => m.DateOfBirth, "{0:dd/MM/yyyy}", htmlAttributes: new Dictionary<string, object> { { "class", "form-control date" }, { "id", "Expiration" }, { "placeholder", "Ngày / tháng / năm" }, { "readonly", "readonly" } })
                                        <span class="input-group-btn">
                                            <button class="btn default" type="button"><i class="fa fa-calendar"></i></button>
                                        </span>
                                    </div>
                                    <p class="text-danger text-error">@Html.ValidationMessageFor(m => m.DateOfBirth)</p>
                                </div>
                            </div>
                        </div>
                        <div class="form-actions nobg bottom left">
                            <button type="submit" class="btn btn-lg btn-primary"><i class="fa fa-edit"> </i> Cập Nhật Tài Khoản</button>
                        </div>
                    </div>
                </div>
            }
        </div>
    </div>
</div>


@section styles {
    <link rel="stylesheet" type="text/css" href="~/Content/metronic/plugins/bootstrap-datepicker/css/datepicker.css" />
}

@section scripts {
    <script type="text/javascript" src="~/Content/metronic/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
    <script>
        jQuery(document).ready(function () {
            if (jQuery().datepicker) {
                $('.date-picker').datepicker({
                    rtl: App.isRTL(),
                    autoclose: true
                });
                $('body').removeClass("modal-open"); // fix bug when inline picker is used in modal
            }
        });
    </script>
}